#include<iostream>
using namespace std;

int main()
{
	int m, n;
	while (cin >> m >> n)
	{
		int a[9][9];
		for (int i = 1; i <= n; i++)
			a[0][i] = 1;
		for (int j = 1; j <= m; j++)
			a[j][0] = 1;
		for (int i = 1; i <= m; i++)
		    for (int j = 1; j <= n; j++)
		    {
				a[i][j] = a[i - 1][j] + a[i][j - 1];
	    	}
			cout << a[m][n]<<endl;
	}
	return 0;
}